// 邮箱
export const REG_EMAIL = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;

// 域名
export const REG_DOMAIN = /[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+.?/;

// IP
export const REG_IPV4 =
  /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/;

// 手机
export const REG_PHONE = /^([1][3,4,5,6,7,8,9])\d{9}$/;

// 日期
export const REG_DATE = /^d{4}-d{1,2}-d{1,2}/;

// 中文
export const REG_CHINESE = /^[\u4e00-\u9fa5]{0,}$/;

// 邮政编码
export const REG_POSTCODE = /[1-9]\d{5}(?!\d)/;

// 二代身份证
export const REG_IDCODE = /^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\d|30|31)\d{3}[\dXx]$/;

// 十六进制颜色
export const REG_COLOR = /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/;
